<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

//test
class Event extends CI_Controller {
	
	public function add_participant($event_id){
	        $this->load->model('EventsModel');
			$this->EventsModel->addParticipant($event_id);

            $events = $this->EventsModel->getEvents();
    	    $this->load->view("events", array("events"=>$events));
	}	
	
	public function up_weight($event_id){
			$this->load->model('EventsModel');
			$this->EventsModel->upWeight($event_id);

            $events = $this->EventsModel->getEvents();
    		$this->load->view("events", array("events"=>$events));
	}
	
	public function remove_participant($event_id){
			$this->load->model('EventsModel'); 
			$this->EventsModel->removeParticipant($event_id);
			//redirect('/');
            $events = $this->EventsModel->getEvents();
    		$this->load->view("events", array("events"=>$events));


	}
}
?>

